﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Runtime.Serialization;

namespace Lib.Query
{
    [Serializable()]
    [DataContract]
    public class Criteria
    {        
        private string _propertyName;
        
        private object _value;
        
        private CriteriaOperator _criteriaOperator;

        public Criteria() : this(null,null, CriteriaOperator.Equal)
        {         
        }

        public Criteria(string propertyName, object value, CriteriaOperator criteriaOperator)
        {
            _propertyName = propertyName;
            _value = value;
            _criteriaOperator = criteriaOperator;
        }

        [DataMember]
        public string PropertyName 
        {
            get { return _propertyName; }
            set { _propertyName = value; }
        }

        [DataMember]
        public object Value
        {
            get { return _value; }
            set { _value = value; }
        }

        [DataMember]
        public CriteriaOperator criteriaOperator
        {
            get { return _criteriaOperator; }
            set { _criteriaOperator = value; }
        }
    }
}
